﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;
using System.Data.SQLite;

public partial class BasicInfo_UserManage : UDCPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            UserDataBind();
        }
    }

    private void UserDataBind()
    {
        string sqlstr = @"select username,loginname,t2.dname,t4.rolename
                          from ud_user_t t1
                          left join ud_depart_t t2  
                            on t1.did = t2.did    
                          left join ud_user_role_t t3  
                            on t1.uid = t3.uid    
                          left join ud_role_t t4
                            on t3.rid = t4.rid;";
        UserList.DataSource = SQLiteHelper.ExecuteDataset(sqlstr, null);
        UserList.DataBind();
    }
}